package com.itheima.commons.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 重新封装一个用户详情实体
 * 性别 ：
 * 1、男
 * 2、女
 * 3、未知
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName(value = "tb_user_info")
public class UserInfos  implements Serializable {

    private Long id;
    private Long userId; //用户id
    private String nickName; //昵称
    private String logo; //用户头像
    private String tags; //用户标签：多个用逗号分隔
    private String sex; //性别
    private Integer age; //年龄
    private String edu; //学历
    private String city; //城市
    private String birthday; //生日
    private String coverPic; // 封面图片
    private String industry; //行业
    private String income; //收入
    private String marriage; //婚姻状态

    public void setSex(Integer sex) {
        this.sex = sex == 3 ? "未知" : (sex == 1 ? "男" : "女");
    }
}
